package model

import (
	"time"
)

type Server struct {
	ID               int        `gorm:"column:id;primary_key;AUTO_INCREMENT;comment:ID"`
	ClientVer        string     `gorm:"column:client_ver;type:varchar(255);not null;"`
	Name             string     `gorm:"column:name;type:varchar(50);not null;"`
	Alias            string     `gorm:"column:alias;type:varchar(20);not null"`
	GameAddr         string     `gorm:"column:game_addr;type:varchar(100);not null"`
	GamePort         int        `gorm:"column:game_port;type:int(11)"`
	LogDBConfig      string     `gorm:"column:log_db_config;type:varchar(500);not null"`
	ReportURL        string     `gorm:"column:report_url;type:varchar(500);not null"`
	Status           int        `gorm:"column:status;type:int(11)"`
	CreateTime       *time.Time `gorm:"column:create_time"`
	RequireVer       int        `gorm:"column:require_ver;type:int(11)"`
	Remark           string     `gorm:"column:remark;type:varchar(200);not null"`
	JsonData         string     `gorm:"column:json_data;type:varchar(1000);not null"`
	Order            int        `gorm:"column:order;type:int(11);not null"`
	Commend          int        `gorm:"column:commend;type:int(11);not null"`
	IsIOS            int        `gorm:"column:is_ios;type:int(11);not null"`
	LastTime         *time.Time `gorm:"column:last_time"`
	TabID            int        `gorm:"column:tabId;type:int(11)"`
	GameData         string     `gorm:"column:game_data;type:varchar(1000)"`
	BattleplanID     int        `gorm:"column:battleplan_id;type:int(11)"`
	RealNumber       int        `gorm:"column:real_number;type:int(6)"`
	ExpectNumber     int        `gorm:"column:expect_number;type:int(6)"`
	ExpectTime       int        `gorm:"column:expect_time;type:int(2)"`
	SwitchStatus     int        `gorm:"column:switch_status;type:int(2)"`
	OpenServerStatus int        `gorm:"column:open_server_status;type:int(5)"`
	Bitflag          uint32     `gorm:"column:bitflag;type:int(32)"`
	SeasonGroupID    uint32     `gorm:"column:season_group_id;type:int(32)"`
}

func (Server) TableName() string {
	return "servers"
}
